#ifndef __CLOCALTP_SQLITE_H__
#define __CLOCALTP_SQLITE_H__

#include "ITaskProvider.h"

#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlRecord>
#include <QVariant>
#include <QDateTime>
#include <QDir>

class CLocalTP_SQlite : public QObject, public ITaskProvider
{
	Q_OBJECT
	Q_INTERFACES(ITaskProvider)
	
public:
	CLocalTP_SQlite(QString dbfilePath = "ToQo.db");
	~CLocalTP_SQlite();
	bool open();
	bool close();
	inline void setLogin(QString login) {}
	inline void setPassword(QString password) {}
	QString providerName();

	QVector<STask*> getTasks();
	bool addTask(STask *task);
	bool setChange(STask *task);
	bool delTask(STask *task);
	
private:
	QSqlDatabase m_db;
};

#endif //__CLOCALTP_SQLITE_H__
